<template>
  <div class="membermore">
    <wback></wback>
    <!-- 我的开始 -->
    <div class="myfl">
      <router-link to="/welfare">我的福利</router-link>
    </div>
    <!-- 我的结束 -->
    <!-- 列表 开始 -->
    <div class="big">
      <div class="coupon" v-for="(item, i) in members" :key="i">
        <img :src="require(`../assets/member/${item.src}`)" />
        <div class="topic">
          <p>{{ item.title }}</p>
          <button>领取</button>
        </div>
      </div>
    </div>
    <!-- 列表 结束 -->
    <!-- 底线 -->
    <div class="bottom">······已经到底了······</div>
    <tabbar></tabbar>
  </div>
</template>
<script>
export default {
  data() {
    return {
      members: [],
    };
  },
  methods: {
    loadMember() {
      this.axios.get(`/members`).then((result) => {
        this.members = result.data.data;
        // 一开始判断每一个商品的选中状态，是否选中全选按钮
      });
    },
  },
  mounted() {
    this.loadMember();
  },
};
</script>

<style>
.membermore {
  background: #5a4f60 url(../assets/membermore/top.jpg) no-repeat;
  background-size: 100%;
  overflow: hidden;
}
/* 我的福利 */
.membermore .myfl {
  width: 100px;
  height: 35px;
  border-radius: 35px;
  color: #fff;
  font-size: 14px;
  line-height: 35px;
  background-color: #696073;
  position: absolute;
  top: 10%;
  right: -10px;
}
.membermore .myfl > a {
  color: #fff;
}
/* 主要内容 */
.membermore .big {
  margin: 0 auto;
  margin-top: 200px;
  width: 90%;
  display: flex;
  justify-content: space-between;
  flex-flow: row wrap;
}
.membermore .coupon {
  width: 48%;
  background-color: #efefef;
  border-radius: 10px;
  margin-top: 10px;
}
.membermore .topic {
  height: 80px;
  font-size: 14px;
  text-align: center;
}
.membermore .coupon > img {
  width: 100%;
  border-radius: 10px 10px 0 0;
}
.membermore .coupon p {
  line-height: 30px;
  margin-bottom: 10px;
}
.membermore .coupon button {
  width: 70px;
  height: 30px;
  border-radius: 30px;
  border: 0;
  background-color: #bce0ff;
}
.membermore .bottom {
  color: #aaa;
  margin-top: 20px;
  padding-bottom: 100px;
}
</style>
